﻿@{
    ViewBag.Title = "文章列表";
    Layout = "_adminLayout.cshtml";
}
<div class="container">
    <div id="subNav" title="posts" class="float-right">
        <div class="button-group">
            <a href="/sean/posts" class="button button-big bg-red">文章管理</a>
            <a href="/sean/categorys" class="button button-big">分类管理</a>
        </div>
    </div>

    <div id="secNav">
        <div class="button-toolbar">
            <div class="button-group">
                <a class="button" href="/sean/posts/add"><i class="icon-plus-square text-blue"></i>写文章</a>
            </div>

        </div>
    </div>
    <table class="table table-striped">
        <thead>
            <tr class="current">
                <th>Id</th>
                <th>标题</th>
                <th>分类</th>
                <th>发布时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.Items)
            {
                <tr>
                    <td>@item.Id</td>
                    <td>@item.Title</td>
                    <td>@item.CategoryName</td>
                    <td>@item.CreateTime</td>
                    <td>
                        <a href="/sean/posts/edit/@item.Id" class="button button-little"><i class="icon-edit text-main"></i>编辑</a>
                        <a href="javascript:del('/sean/posts/del/@item.Id')" class="button button-little"><i class="icon-trash-o text-red"></i>删除</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
    <div class="margin-big-top text-right">
        <div id="Page"></div>
    </div>
</div>
@section scripts{
    <script>
        Do.ready('base','page','dialog',function() {
            helper.page(@Model.CurrentPage,@Model.TotalPages,5,'/sean/posts/');
        });
    </script>
}